var app = new Vue({
  el: '#app',
  data: {
    categorizesActiveIndex:0,
    categorizesActiveMemoryIndex:0,
    columns:[
      {
        "label":"关于我",
        "id":"about",
        "icon":"icon-guanyuwomen"
      },
      {
        "label":"我的作品",
        "id":"works",
        "icon":"icon-zuopin"
      },
      {
        "label":"我的回忆",
        "id":"memory",
        "icon":"icon-jiyishoucang"
      },
      {
        "label":"联系方式",
        "id":"contact",
        "icon":"icon-youxiang"
      }
    ],
    categorizes:[
      {
        "label":"PC端",
        "module":"pc"
      },
      {
        "label":"移动端",
        "module":"mobile"
      },
      {
        "label":"插件",
        "module":"plug-in"
      },
      {
        "label":"小程序",
        "module":"miniprogram"
      }
    ],
    categorizesMemory:[
      {
        "label":"动画",
        "module":"animation"
      },
      {
        "label":"插件",
        "module":"plug-in"
      },
      {
        "label":"导航特效",
        "module":"nav"
      },
      {
        "label":"轮播图特效",
        "module":"carousel"
      },
      {
        "label":"图片特效",
        "module":"image"
      },
      {
        "label":"页面",
        "module":"page"
      }
    ],
    modules:[
      {
        "link":"https://zzjzml.atomgit.net/vue3.2-online/#/",
        "title":"Leiui",
        "desc":"vue3.2+AntDesign+ts搭建的后台管理框架",
        "type":"pc"
      },
      {
        "link":"https://zzjzml.atomgit.net/mimicShop-online/#/",
        "title":"电商网站",
        "desc":"仿电商网站",
        "type":"pc"
      },
      {
        "link":"http://1.194.200.115:8081/erp/dashboard",
        "title":"药天下云平台",
        "desc":"账号：0000 密码：123456",
        "type":"pc"
      },
      {
        "link":"http://36.99.34.131:8054/#/dashboard",
        "title":"药天下移动商务平台",
        "desc":"账号：18010 密码：123456",
        "type":"pc"
      },
      {
        "link":"http://36.99.140.130:6300/#/",
        "title":"药天下授权平台",
        "desc":"账号：1011 密码：123456",
        "type":"pc"
      },
      {
        "link":"http://36.99.34.131:8055/#/",
        "title":"药天下OA",
        "desc":"账号：18010 密码：123456",
        "type":"mobile",
        "mobile":true
      },
      {
        "link":"http://1.194.200.115:8086/#/",
        "title":"药天下WMS手持",
        "desc":"账号：admin 密码：123456",
        "type":"mobile",
        "mobile":true
      },
      {
        "link":"https://ext.dcloud.net.cn/plugin?id=9101",
        "title":"ufast",
        "desc":"基于uniapp开发的轻量框架",
        "type":"plug-in"
      },
      {
        "link":"https://ext.dcloud.net.cn/plugin?id=23432",
        "title":"ufast-next",
        "desc":"ufast的下一代版本",
        "type":"plug-in"
      },
      {
        "link":"",
        "image":"./img/ufast.jpg",
        "title":"ufast",
        "desc":"「ufast」小程序",
        "type":"miniprogram"
      },
      {
        "link":"",
        "image":"./img/yyh.jpg",
        "title":"药要好",
        "desc":"「药要好」小程序",
        "type":"miniprogram"
      },
      {
        "link":"",
        "image":"./img/xhyy.jpg",
        "title":"河南星辉医药",
        "desc":"「河南星辉医药」小程序\r\n账号：01070 密码：123456",
        "type":"miniprogram"
      }
    ],
    memoryList:[
      {
        "link":"page/animation/css3-animate/index.html",
        "title":"css3动画",
        "type":"animation"
      },
      {
        "link":"page/animation/css3-loading/index.html",
        "title":"css加载动画",
        "type":"animation"
      },
      {
        "link":"page/animation/car/index.html",
        "title":"小汽车动画",
        "type":"animation"
      },
      {
        "link":"page/animation/slide/Verticalflip.html",
        "title":"页面全屏滚动",
        "type":"animation"
      },
      {
        "link":"page/animation/scroll/index.html",
        "title":"页面懒加载",
        "type":"animation"
      },
      {
        "link":"page/plug-in/comment/comment.html",
        "title":"评分插件",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/jedate/test.html",
        "title":"日期控件",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/upload/index.html",
        "title":"文件上传",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/verification-code/index.html",
        "title":"验证码",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/textarea-limit/Untitled-1.html",
        "title":"textarea输入框限制字数",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/validation/validation.html",
        "title":"表单验证",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/validation2/Validform.html",
        "title":"表单验证2",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/countdown/index.html",
        "title":"倒计时",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/rich-text/Untitled-1.html",
        "title":"富文本",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/linkage-jquery/linkage.html",
        "title":"省市区联动（jquery）",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/linkage-js/index.html",
        "title":"省市区联动（js）",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/filter/shaixuan.html",
        "title":"条件筛选",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/modal/modal-frame.html",
        "title":"模态框",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/return-top/index.html",
        "title":"返回顶部",
        "type":"plug-in"
      },
      {
        "link":"page/plug-in/jquery-drag/index.html",
        "title":"jquery拖拽",
        "type":"plug-in"
      },
      {
        "link":"page/nav/red-nav/index.html",
        "title":"红色导航",
        "type":"nav"
      },
      {
        "link":"page/nav/categories-nav/index.html",
        "title":"分类导航",
        "type":"nav"
      },
      {
        "link":"page/nav/categories-nav2/index.html",
        "title":"分类导航2",
        "type":"nav"
      },
      {
        "link":"page/nav/anchor-point/index.html",
        "title":"电梯",
        "type":"nav"
      },
      {
        "link":"page/nav/secondary-menu/index.html",
        "title":"二级菜单",
        "type":"nav"
      },
      {
        "link":"page/nav/roll-nav/index.html",
        "title":"翻滚导航",
        "type":"nav"
      },
      {
        "link":"page/nav/down-nav/index.html",
        "title":"下拉导航",
        "type":"nav"
      },
      {
        "link":"page/nav/tag-switching/index.html",
        "title":"标签切换",
        "type":"nav"
      },
      {
        "link":"page/nav/bar-nav/index.html",
        "title":"导航条",
        "type":"nav"
      },
      {
        "link":"page/nav/vertical-nav/index.html",
        "title":"竖向导航",
        "type":"nav"
      },
      {
        "link":"page/nav/down-menu/dropdown.html",
        "title":"下拉菜单",
        "type":"nav"
      },
      {
        "link":"page/nav/down-nav-menu/index.html",
        "title":"下拉导航菜单",
        "type":"nav"
      },
      {
        "link":"page/nav/fold-menu/index.html",
        "title":"折叠菜单",
        "type":"nav"
      },
      {
        "link":"page/nav/stick-nav/index.html",
        "title":"粘性导航",
        "type":"nav"
      },
      {
        "link":"page/carousel/3D-carousel/index.html",
        "title":"3D轮播图",
        "type":"carousel"
      },
      {
        "link":"page/carousel/three-dimensional-carousel/index.html",
        "title":"立体轮播图",
        "type":"carousel"
      },
      {
        "link":"page/carousel/thumbnail-carousel/index.html",
        "title":"缩略图",
        "type":"carousel"
      },
      {
        "link":"page/carousel/skitter/Untitled-2.html",
        "title":"碎片",
        "type":"carousel"
      },
      {
        "link":"page/carousel/superslide/index.html",
        "title":"滑动门",
        "type":"carousel"
      },
      {
        "link":"page/carousel/swiper/index.html",
        "title":"移动端滑动门",
        "type":"carousel",
        "mobile":true
      },
      {
        "link":"page/carousel/slide/index.html",
        "title":"幻灯片",
        "type":"carousel"
      },
      {
        "link":"page/carousel/tab-carousel/index.html",
        "title":"tab滑动切换",
        "type":"carousel"
      },
      {
        "link":"page/carousel/mobile-carousel/mobile.html",
        "title":"移动端轮播图",
        "type":"carousel",
        "mobile":true
      },
      {
        "link":"page/image/amplify/index.html",
        "title":"图片放大",
        "type":"image"
      },
      {
        "link":"page/image/accordion/index.html",
        "title":"手风琴",
        "type":"image"
      },
      {
        "link":"page/image/skin-peeler/index.html",
        "title":"换肤",
        "type":"image"
      },
      {
        "link":"page/image/hover/index.html",
        "title":"悬浮放大",
        "type":"image"
      },
      {
        "link":"page/image/proportion/index.html",
        "title":"等比例放大",
        "type":"image"
      },
      {
        "link":"page/image/magnifier/index.html",
        "title":"放大镜",
        "type":"image"
      },
      {
        "link":"page/image/mask/index.html",
        "title":"遮罩",
        "type":"image"
      },
      {
        "link":"page/image/echar/index.html",
        "title":"兴趣图谱",
        "type":"image"
      },
      {
        "link":"page/page/table/index.html",
        "title":"表格页",
        "type":"page"
      },
      {
        "link":"page/page/login/index.html",
        "title":"登录页",
        "type":"page"
      },
      {
        "link":"page/page/register/index.html",
        "title":"注册页",
        "type":"page"
      },
      {
        "link":"page/page/public-query/index.html",
        "title":"公共查询",
        "type":"page"
      },
      {
        "link":"page/page/enterprise-space/index.html",
        "title":"企业空间",
        "type":"page"
      },
      {
        "link":"page/page/tianjin/index.html",
        "title":"天津建委",
        "type":"page",
        "mobile":true
      },
      {
        "link":"page/page/beijing-manage/index.html",
        "title":"北京市职权管理系统",
        "type":"page"
      },
      {
        "link":"page/page/points-mall/index.html",
        "title":"积分商城",
        "type":"page"
      },
      {
        "link":"page/page/travel/home_page.html",
        "title":"旅游app",
        "type":"page",
        "mobile":true
      },
      {
        "link":"page/page/merchant-details/index.html",
        "title":"商家详情",
        "type":"page",
        "mobile":true
      },
      {
        "link":"page/page/novel/index.html",
        "title":"小说首页",
        "type":"page"
      },
      {
        "link":"page/page/calculator/index.html",
        "title":"计算器",
        "type":"page"
      }
    ],
    copyMemoryList:[],
    copyModules:[],
    myInfo:{
      "name":"小小的人",
      "desc":"前端小白",
      "mail":"zzjzml2022@163.com",
      "copyright":"2025 小小的人的个人博客. All rights reserved."
    },
    pageInfo:{
      "slogen":"探索前端开发的无限可能",
      "personalProfile":"我的技能",
      "skillDisplay":[
        "移动端：微信小程序开发、app开发、h5开发。",
        "电脑端：企业官网开发、企业后台系统开发。",
        "技术栈：uniapp、uniapp x、vue2、vue3、uts、typescript、ElementUI、AntDesign。",
        "服务端：php、mysql、thinkphp5、serverless。",
      ],
      "bannerAlt":"工作台",
      "modulesBigTitle":"作品展示",
      "memoryBigTitle":"我的回忆",
      "navTitle":"锚点",
      "contactTitle":"联系方式"
    }
  },
  methods: {
    toView:function(id){
      document.getElementById(id).scrollIntoView({
        behavior: 'smooth'
      })
    },
    toLink:function(item){
      if(!item.link && item.type === 'miniprogram'){
        alert('微信扫码即可访问')
        return
      }
      var screenWidth = window.outerWidth || document.documentElement.clientWidth || document.body.clientWidth;
      var screenHeight = window.outerHeight || document.documentElement.clientHeight || document.body.clientHeight;
      var width = item.mobile ? 375 : screenWidth
      var height = item.mobile ? 650 : screenHeight
      var left = (screenWidth / 2) - (width / 2);
      var top = (screenHeight / 2) - (height / 2);
      var windowFeatures = `width=${width},height=${height},left=${left},top=${top}`;
      window.open(item.link, '_blank', windowFeatures);
    },
    changeCategorize:function(index,item){
      this.categorizesActiveIndex = index
      this.modules = this.copyModules.filter(function(items){
        return item.module ? items.type === item.module : true
      })
    },
    getModulesNum:function(item){
      return this.copyModules.filter(function(items){
        return item.module ? items.type === item.module : true
      }).length
    },
    changeCategorizeMemory:function(index,item){
      this.categorizesActiveMemoryIndex = index
      this.memoryList = this.copyMemoryList.filter(function(items){
        return item.module ? items.type === item.module : true
      })
    },
    getModulesNumMemory:function(item){
      return this.copyMemoryList.filter(function(items){
        return item.module ? items.type === item.module : true
      }).length
    }
  },
  watch:{
    
  },
  mounted:function(){
    this.copyModules = JSON.parse(JSON.stringify(this.modules))
    this.copyMemoryList = JSON.parse(JSON.stringify(this.memoryList))
    this.changeCategorize(0,this.categorizes[0])
    this.changeCategorizeMemory(0,this.categorizesMemory[0])
    document.title = this.myInfo.name + '个人博客'
  }
})